home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 38 / Amiga Format CD38 (1999-03-15)(Future Publishing)(GB)(Track 1 of 3)[!][issue 1999-04].iso / -seriously_amiga- / misc / ced_html / html / html_textaspect.ced < prev    next >
Text File  |  1999-01-25  |  4KB  |  111 lines

  1. /*
  2. ** html_textaspect.ced
  3. **
  4. ** $VER: html_textaspect.ced 1.3 (12.20.1998)
  5. **
  6. ** Arexx script for HTML v3.2 text aspect
  7. **
  8. ** This script works with CygnusEd Professional v4.2
  9. **
  10. ** Copyright © Eric BELLE
  11. */
  12.  
  13. /*
  14. **------------------------------------------------------------------------------
  15. **    Initialisation
  16. **------------------------------------------------------------------------------
  17. */
  18.  
  19. OPTIONS RESULTS                            /* Tell CygnusEd to return results. */
  20. NL = '0A'X                                    /* Alias for new line. */
  21. KRETURN = RAWKEY 68                    /* Shortcut to the return key. */
  22. KTAB = RAWKEY 66                        /* Shortcut to the tab key. */
  23. STATUS TABSARESPACES                /* Return TAB mode ("tab" or "space"). */
  24. IF RESULT = 1                                /* Test the TAB mode. */
  25. THEN "TABS = SPACES"                /* Switch TAB mode from "space" to "tab". */
  26. ELSE NOP                                        /* No operation. */
  27. TAB SIZE 1                                    /* Set TAB size proportional to 2 spaces. */
  28.  
  29. /*
  30. **------------------------------------------------------------------------------
  31. **    Text aspect choice
  32. **------------------------------------------------------------------------------
  33. */
  34.  
  35. TextAspectChoice="no"
  36. DO WHILE (TextAspectChoice="no")
  37.         OKAY2 "Text aspect:"                                                                            || NL ||,
  38.                     "~~~~~~~~~~~"                                                                                || NL ||,
  39.                     " (0)  - default        |  (9)  - definition    "        || NL ||,
  40.                     " (1)  - italic         |  (10) - sample        "        || NL ||,
  41.                     " (2)  - bold           |  (11) - variable      "        || NL ||,
  42.                     " (3)  - underline      |  (12) - source code   "        || NL ||,
  43.                     " (4)  - subscript      |  (13) - citation      "        || NL ||,
  44.                     " (5)  - superscript    |  (14) - teletype      "        || NL ||,
  45.                     " (6)  - small          |  (15) - keybord       "        || NL ||,
  46.                     " (7)  - big            |  (16) - URL           "        || NL ||,
  47.                     " (8)  - strike         |  (17) - formated text "
  48.  
  49.     IF (RESULT=0)
  50.     THEN EXIT 0
  51.     ELSE TextAspectChoice="ok"
  52.  
  53.     GETNUMBER 0 '"Text aspect?"' 0 17
  54.     TextAspect = RESULT
  55.  
  56.     IF (TextAspect=" ")
  57.     THEN TextAspectChoice = "no"
  58.     ELSE NOP
  59. END
  60.  
  61. /*
  62. **------------------------------------------------------------------------------
  63. **    Html text aspect marks
  64. **------------------------------------------------------------------------------
  65. */
  66.  
  67. SELECT
  68.     WHEN (TextAspect=1) THEN TextAspectString = "I"
  69.     WHEN (TextAspect=2) THEN TextAspectString = "B"
  70.     WHEN (TextAspect=3) THEN TextAspectString = "U"
  71.     WHEN (TextAspect=4) THEN TextAspectString = "SUB"
  72.     WHEN (TextAspect=5) THEN TextAspectString = "SUP"
  73.     WHEN (TextAspect=6) THEN TextAspectString = "SMALL"
  74.     WHEN (TextAspect=7) THEN TextAspectString = "BIG"
  75.     WHEN (TextAspect=8) THEN TextAspectString = "STRIKE"
  76.     WHEN (TextAspect=9) THEN TextAspectString = "DFN"
  77.     WHEN (TextAspect=10) THEN TextAspectString = "SAMP"
  78.     WHEN (TextAspect=11) THEN TextAspectString = "VAR"
  79.     WHEN (TextAspect=12) THEN TextAspectString = "CODE"
  80.     WHEN (TextAspect=13) THEN TextAspectString = "CITE"
  81.     WHEN (TextAspect=14) THEN TextAspectString = "TT"
  82.     WHEN (TextAspect=15) THEN TextAspectString = "KBD"
  83.     WHEN (TextAspect=16) THEN TextAspectString = "ADDRESS"
  84.     WHEN (TextAspect=17) THEN TextAspectString = "PRE"
  85.     OTHERWISE NOP
  86. END
  87.  
  88. /*
  89. **------------------------------------------------------------------------------
  90. **    Html text aspect marks
  91. **------------------------------------------------------------------------------
  92. */
  93.  
  94. IF (TextAspect=0)
  95. THEN NOP
  96. ELSE DO
  97.     TEXT "<" || TextAspectString || ">"
  98.     "AUTO-INDENT" ; KTAB
  99.     TEXT "Sould be modified - Text aspect"
  100.     "AUTO-INDENT" ; BACKTAB
  101.     TEXT "</" || TextAspectString || ">"
  102.     END
  103.  
  104. /*
  105. **------------------------------------------------------------------------------
  106. **    End of html_textaspect.ced Arexx script
  107. **------------------------------------------------------------------------------
  108. */
  109.  
  110. EXIT 0
  111.